/*
 * File: J_rl_T03_q2.c
 *
 * MATLAB Coder version            : 5.2
 * C/C++ source code generated on  : 22-Apr-2025 04:13:42
 */

/* Include Files */
#include "J_rl_T03_q2.h"
#include <math.h>

/* Function Definitions */
/*
 * J_RL_T03_Q2
 *     U32 = J_RL_T03_Q2(IN1,IN2)
 *
 * Arguments    : const double in1[4]
 *                const double in2[4]
 *                double u32[16]
 * Return Type  : void
 */
void J_rl_T03_q2(const double in1[4], const double in2[4], double u32[16])
{
  double t10;
  double t11;
  double t12;
  double t13;
  double t14;
  double t15;
  double t2;
  double t3;
  double t34;
  double t35;
  double t36;
  double t36_tmp;
  double t38;
  double t4;
  double t5;
  double t6;
  double t7;
  double t8;
  double t9;
  /*     This function was generated by the Symbolic Math Toolbox version 8.7.
   */
  /*     21-Apr-2025 11:22:22 */
  t2 = cos(in2[0]);
  t3 = cos(in2[1]);
  t4 = cos(in2[2]);
  t5 = cos(in1[0]);
  t6 = cos(in1[1]);
  t7 = cos(in1[2]);
  t8 = sin(in2[0]);
  t9 = sin(in2[1]);
  t10 = sin(in2[2]);
  t11 = sin(in1[0]);
  t12 = sin(in1[1]);
  t13 = sin(in1[2]);
  t14 = t5 * t6;
  t15 = t5 * t12;
  t34 = t15 + t3 * t6 * t11;
  t35 = t14 + -(t3 * t11 * t12);
  t5 = t3 * t8;
  t36_tmp = t6 * t8;
  t36 = (t2 * t9 * t12 + t36_tmp * t11) + t5 * t15;
  t6 *= t2;
  t38 = (t6 * t9 + t5 * t14) + -(t8 * t11 * t12);
  t3 *= t2;
  t5 = (t6 * t11 + t3 * t15) + -(t8 * t9 * t12);
  t6 = (t36_tmp * t9 + t2 * t11 * t12) + -(t3 * t14);
  t3 = t4 * t13;
  u32[0] = -t7 * t34 - t3 * t35;
  u32[1] = -t7 * t6 - t3 * t5;
  u32[2] = t7 * t38 - t3 * t36;
  u32[3] = 0.0;
  t3 = t4 * t7;
  u32[4] = t13 * t34 - t3 * t35;
  u32[5] = t13 * t6 - t3 * t5;
  u32[6] = -t13 * t38 - t3 * t36;
  u32[7] = 0.0;
  t3 = t10 * t35;
  u32[8] = t3;
  t5 *= t10;
  u32[9] = t5;
  t6 = t10 * t36;
  u32[10] = t6;
  u32[11] = 0.0;
  u32[12] = t3 * 0.3972;
  u32[13] = t5 * 0.3972;
  u32[14] = t6 * 0.3972;
  u32[15] = 0.0;
}

/*
 * File trailer for J_rl_T03_q2.c
 *
 * [EOF]
 */
